﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="listout.aspx.cs" Inherits="lcs.Web.project.listout" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
 <link href="/style.css" type="text/css" rel="stylesheet" />
     <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../Scripts/JsTools.js" type="text/javascript"></script>
    <link href="../admin/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="../admin/lib/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    
    <script src="../admin/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
    <script src="../admin/lib/ligerUI/js/plugins/ligerDrag.js" type="text/javascript"></script>
    <script src="../admin/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
    <script src="../admin/lib/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
    <script src="../Scripts/mybase.js"></script>
    <script src="../js/CheckBox.js"></script>
    <link href="../jquery-ui.min.css" rel="stylesheet" />    
    <script src="../js/jquery-ui.min.js"></script>
    <style type="text/css">
        td { font-size: 9pt}
        a { color:Blue; text-decoration: none}
        body{ font-size:9pt;}
     </style>

    <script type="text/javascript">
        function showQRC(id) {
            window.open('../PrintQCR.aspx?id=' + id + "&type=out_detail", 'newwindow', 'height=600, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
        }
        var win1;
        function f_open(id) {
            var pname = $("#<%= lbl_projectname.ClientID %>").text();
            var ul = 'addmaterial.aspx?id=' + id + '&pn=' + encodeURI(encodeURI(pname));
            win1 = $.ligerDialog.open({ url: ul, height: 550, isResize: true, width: 900, showMax: false, showToggle: false, modal: true, isResize: true, slide: true, title: '操作', onClosed: function () { alert('asdf'); } });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
                <tr>
                    <td style="width: 80px" align="right" class="tdbg">
                         <b>物料名：</b>
                    </td>
                    <td class="tdbg">
                        <asp:TextBox ID="txtKeyword" runat="server" width="200px"></asp:TextBox> 
                    <asp:Button ID="btnSearch" runat="server" Text="查询"  OnClick="btnSearch_Click" >
                    </asp:Button>                    
                        目的项目：<asp:Label ID="lbl_projectname" 
              runat="server"></asp:Label>
                    </td>
                    <td class="tdbg">
                    </td>
                </tr>
            </table>
            <!--Search end-->
            <br />
            <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="100%" BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None"  OnPageIndexChanging ="gridView_PageIndexChanging"
                     DataKeyNames="out_storageList_id" OnRowDataBound="gridView_RowDataBound" onrowcommand="GridView1_RowCommand"
                    AutoGenerateColumns="false" PageSize="15"  RowStyle-HorizontalAlign="Center" OnRowCreated="gridView_OnRowCreated">
                    <Columns>
                        <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbn_out" runat="server" 
                            CommandArgument='<%# Bind("out_storageList_id") %>' CommandName="lbn_out">分码</asp:LinkButton>
                        <asp:Label ID="lbl_spid" runat="server" Text='<%# Bind("mid") %>' 
                            Visible="False"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="分码数量">
                    <ItemTemplate>
                        <asp:TextBox ID="txt_out_storage_count" runat="server" Width="50px"></asp:TextBox>
                        <br />
                    </ItemTemplate>
                </asp:TemplateField>
                        <asp:TemplateField HeaderText="数量">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("out_storage_count") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lbl_venNums" runat="server" Text='<%# Bind("out_storage_count") %>'></asp:Label>
                        
                    </ItemTemplate>
                </asp:TemplateField>
                        <asp:BoundField DataField="out_storage_count" HeaderText="出库量" />
                         <asp:BoundField DataField="snums" HeaderText="分码量" />
                         <asp:BoundField DataField="synums" HeaderText="剩余量" />
                <asp:BoundField DataField="material" HeaderText="物料描述" />                
                <asp:BoundField DataField="mbm" HeaderText="物料编码" />
                        <asp:BoundField DataField="mid" HeaderText="物料ID" />
                    </Columns>
                </asp:GridView>

    <div style=" margin-top:10px; text-align :center;">
        <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
                <tr>
                    <td style="width: 80px" align="right" class="tdbg">
                         <b>物料名：</b>
                    </td>
                    <td class="tdbg" style="width:300px">
                        <asp:TextBox ID="txtwl" runat="server" width="200px"></asp:TextBox> 
                    <asp:Button ID="btnwlsearch" runat="server" Text="查询"  OnClick="btnSearch1_Click" >
                    </asp:Button>
                    </td>
                    <td class="tdbg">
                    </td>
                </tr>
            </table>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="out_storage_detail_Id"
            Width="100%" BorderWidth="0px" CellPadding="0" CellSpacing="1" CssClass="gv" GridLines="None"
            onrowdatabound="GridView2_RowDataBound" onRowDeleting="gridView_RowDeleting" PageSize="15" AllowPaging="True" OnPageIndexChanging ="GridView2_PageIndexChanging">
            <Columns>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <a href="javascript:showQRC('<%# Eval("out_storage_detail_Id") %>')" style="color: Blue">生成二维码 </a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <a href="#" onclick="f_open(<%# Eval("out_storage_detail_Id") %>)" style="color: Blue">增加子物料</a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="material_detail_id" HeaderText="物料分码" />
                <asp:BoundField DataField="material" HeaderText="物料描述" />
                <asp:BoundField DataField="dnums" HeaderText="数量"  DataFormatString="{0:0.00}"/>
                
                <asp:BoundField DataField="mbm" HeaderText="物料编码" />
                <asp:BoundField DataField="fmmaterial" HeaderText="子物料" />
                <asp:HyperLinkField HeaderText="维护信息" ControlStyle-Width="50" DataNavigateUrlFields="out_storage_detail_Id" target="_blank" DataNavigateUrlFormatString="../admin/out_storage_detail/Modify.aspx?id={0}&close=1"
                                Text="编辑"  />  
                 <asp:TemplateField ControlStyle-Width="50" HeaderText="删除"   Visible="true"  >
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                         Text="删除"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
            </Columns>
            <PagerStyle CssClass="mypager" />
        </asp:GridView>
    </div>
</asp:Content>
